export var sysDictList = [
    {label: "非节假日", value: 1, type: "dateType"},
    {label: "节假日", value: 2, type: "dateType"},

    {label: "待部署", value: 0, type: "dutyStatus"},
    {label: "已部署", value: 1, type: "dutyStatus"},
    {label: "已提交", value: 2, type: "dutyStatus"},

    {label: "巡防岗", value: 1, type: "dutyType"},
    {label: "集指岗", value: 2, type: "dutyType"},


    {label: "封闭", value: 0, type: "trafficControlType"},
    {label: "限行", value: 1, type: "trafficControlType"},
    {label: "分流", value: 2, type: "trafficControlType"},
    {label: "借道通行", value: 3, type: "trafficControlType"},
    {label: "其他措施", value: 4, type: "trafficControlType"},

    {label: "超速行驶",        value: 0, type: "illegalAct"},
    {label: "不按规定车道行驶", value: 1, type: "illegalAct"},
    {label: "违法停车",        value: 2, type: "illegalAct"},
    {label: "违法倒车",        value: 3, type: "illegalAct"},
    {label: "违法占用应急车道", value: 4, type: "illegalAct"},

    {label: "上行", value: 0, type: "drivingDirection"},
    {label: "下行", value: 1, type: "drivingDirection"},
    {label: "双向", value: 2, type: "drivingDirection"},

    {label: "关闭", value: 0, type: "gateStatus"},
    {label: "正常", value: 1, type: "gateStatus"},


    {label: "辅警", value: 0, type: "policType"},
    {label: "民警", value: 1, type: "policType"},
];

export function getDictsByType(type) {
    return sysDictList.filter((dic) => {
        return dic.type == type;
    })
}

export function getDictByTypeValue(type, value) {
    const dic = sysDictList.find((dic) => {
        return dic.type == type && dic.value == value;
    });
    if(dic){
        return dic;
    }else{
        return {};
    }

}
